package com.logica.mdm.webfrontend.controllers;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseStatus;

/**
 * Handles requests for the application home page.
 */
@Controller
public class HomeController {

	/**
	 * Simply selects the home view to render by returning its name.
	 */
	@RequestMapping(value="/", method=RequestMethod.GET)
	public String home() {
		return "home";
	}
	
	/**
	 * Method in case of not found path
	 */
	@RequestMapping(value="/NotFound", method=RequestMethod.GET)
	@ResponseStatus(HttpStatus.NOT_FOUND)
	public String notFound(HttpServletRequest servletRequest) {
		return "notFound";
	}
}

